home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 October: Technology Seed / ADC Seed CD - October 1999.toast / FireWire / FireWire_2.1_SDK_DR3 / Source / SBP2 / Build next >
Encoding:
Text File  |  1999-05-17  |  1.4 KB  |  82 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        Build
  3. #
  4. #    Contains:    Commands to build SBP2 sample code
  5. #
  6. #    Version:    1.0
  7. #
  8. #    Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  9. #
  10. #    File Ownership:
  11. #
  12. #        DRI:                Eric Anderson
  13. #
  14. #        Other Contact:        
  15. #
  16. #        Technology:            FireWire
  17. #
  18. #    Writers:
  19. #
  20. #        (EA)    Eric Anderson (ewa)
  21. #
  22. #    Change History (most recent first):
  23. #
  24. #       <FW2>     9/20/98    EA        Filled in header comments.
  25. #       <FW1>     9/20/98    EA        first checked in
  26. #
  27.  
  28. set Commands `Directory`::Tools:,"{Commands}"
  29. export Commands
  30.  
  31. unset BuildTargets
  32.  
  33. ################################################################################
  34. #
  35. # Parse parameters.
  36. #
  37.  
  38. for parm in {"Parameters"}
  39.  
  40. # full build option
  41.     if "{parm}" =~ /-e/
  42.         set DoFullBuild 1
  43.         export DoFullBuild
  44.         continue
  45.     end
  46.  
  47. # default is a build target
  48.     set BuildTargets "{BuildTargets} {parm}"
  49.  
  50. end
  51.  
  52. ################################################################################
  53. #
  54. # Build all targets.
  55. #
  56.  
  57. for BuildTarget in {BuildTargets}
  58.  
  59.     if {DoFullBuild}
  60.         Echo "# `Date -t` ----- Full Build of {BuildTarget}."
  61.     else
  62.         Echo "# `Date -t` ----- Build of {BuildTarget}."
  63.     end
  64.     Echo "# `Date -t` ----- Analyzing dependencies."
  65.  
  66.     Begin
  67.         Echo "Set Echo 1"
  68.         if {DoFullBuild}
  69.             make -e -f MakeFile "{BuildTarget}"
  70.         else
  71.             make -f MakeFile "{BuildTarget}"
  72.         end
  73.     End > "{BuildTarget}".makeout
  74.  
  75.     Echo "# `Date -t` ----- Executing build commands."
  76.     "{BuildTarget}".makeout
  77.     delete -y "{BuildTarget}".makeout
  78.  
  79.     Echo "# `Date -t` ----- Done."
  80.  
  81. end
  82.